package com.cailu.receiver.config;

import java.io.IOException;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.cailu.common.constant.SenderConfFanoutExchangeCommon;

/**
 * @author cailu
 * @filename SenderConfFanoutExchangeReceiver
 * @description Fanout 广播模式
 * @date 2020/4/1 17:18
 */
@Component
public class SenderConfFanoutExchangeReceiver {

	@RabbitListener(queues = SenderConfFanoutExchangeCommon.FANOUT_A_EXCHANGE)
	public void processQueueA(String str) throws IOException {
		System.out.println("Fanout 广播模式:====" + SenderConfFanoutExchangeCommon.FANOUT_A_EXCHANGE + "===============" + str.toString());
	}

	@RabbitListener(queues = SenderConfFanoutExchangeCommon.FANOUT_B_EXCHANGE)
	public void processQueueB(String str) throws IOException {
		System.out.println("Fanout 广播模式:====" + SenderConfFanoutExchangeCommon.FANOUT_B_EXCHANGE + "===============" + str.toString());
	}

	@RabbitListener(queues = SenderConfFanoutExchangeCommon.FANOUT_C_EXCHANGE)
	public void processQueueC(String str) throws IOException {
		System.out.println("Fanout 广播模式:====" + SenderConfFanoutExchangeCommon.FANOUT_C_EXCHANGE + "===============" + str.toString());
	}
}
